package com.avic.rong.activity.mine;

import android.content.Context;
import android.content.Intent;
import android.webkit.WebSettings;

import com.avic.rong.BaseActivity;
import com.avic.rong.R;
import com.example.minato.minastore.utils.AppUtils;

import butterknife.BindView;
import wendu.dsbridge.DWebView;

public class MemberDetailActivity extends BaseActivity {

    @BindView(R.id.dwebview)
    DWebView dWebView;
    @Override
    protected int getContentViewId() {
        return R.layout.activity_member_detail;
    }

    @Override
    protected void initView() {
        tvTitle.setText("会员卡详情");
        ivRight.setBackgroundResource(R.mipmap.slh);


        dWebView.loadUrl(AppUtils.BASE_URL +"help/hyfw");

    }

    @Override
    protected void addListener() {

    }

    private void initWebview() {
        WebSettings setting = dWebView.getSettings();
        setting.setJavaScriptEnabled(true);//支持Js
        setting.setCacheMode(WebSettings.LOAD_DEFAULT);//缓存模式
        //是否支持画面缩放，默认不支持
        setting.setBuiltInZoomControls(true);
        setting.setSupportZoom(true);
        //是否显示缩放图标，默认显示
        setting.setDisplayZoomControls(false);
        //设置网页内容自适应屏幕大小
        setting.setLayoutAlgorithm(WebSettings.LayoutAlgorithm.TEXT_AUTOSIZING);//注意网上例程很多的是.SINGLE_COLUMN，但调试时发现移动版网站会错位，所以改成
        //SINGLE_COLUMN

        setting.setUseWideViewPort(true);
        setting.setLoadWithOverviewMode(true);

    }
    public static Intent queryIntent(Context context) {
        Intent intent = new Intent(context, MemberDetailActivity.class);
        return intent;
    }
}
